First-order queries on classes of structures with bounded expansion

نویسندگان

  • Wojciech Kazana
  • Luc Segoufin
چکیده

We consider the evaluation of first-order queries over classes of databases with bounded expansion. The notion of bounded expansion is fairly broad and generalizes bounded degree, bounded treewidth and exclusion of at least one minor. It was known that over a class of databases with bounded expansion, firstorder sentences could be evaluated in time linear in the size of the database. We give a different proof of this result. Moreover, we show that answers to first-order queries can be enumerated with constant delay after a linear time preprocessing. We also show that counting the number of answers to a query can be done in time linear in the size of the database. Query evaluation is certainly the most important problem in databases. Given a query q and a database D it computes the set q(D) of all tuples in the output of q on D. However, the set q(D) may be larger than the database itself as it can have a size of the form n where n is the size of the database and l the arity of the query. Therefore, computing entirely q(D) may require too many of the available resources. There are many solutions to overcome this problem. For instance one could imagine that a small subset of q(D) can be quickly computed and that this subset will be enough for the user needs. Typically one could imagine computing the top-l most relevant answers relative to some ranking function or to provide a sampling of q(D) relative to some distribution. One could also imagine computing only the number of solutions |q(D)| or providing an efficient test for whether a given tuple belongs to q(D) or not. In this paper we consider a scenario consisting in enumerating q(D) with constant delay. Intuitively, this means that there is a two-phases algorithm working as follows: a preprocessing phase that works in time linear in the size of the database, followed by an enumeration phase outputting one by one all the elements of q(D) with a constant delay between any two consecutive outputs. In particular, the first answer is output after a time linear in the size of the database and once the enumeration starts a new answer is being output regularly at a speed independent from the size of the database. Altogether, the set q(D) is entirely computed in time f(q)(n+ |q(D)|) for some function f depending only on q and not on D. One could also view a constant delay enumeration algorithm as follows. The preprocessing phase computes in linear time an index structure representing the set q(D) in a compact way (of size linear in n). The enumeration algorithm is then a streaming decompression algorithm. One could also require that the enumeration phase outputs the answers in some given order. Here we will consider the lexicographical order based on a linear order on the domain of the database. There are many problems related to enumeration. The main one is the model checking problem. This is the case when the query is boolean, i.e. outputs only true or false. In this case a constant delay enumeration algorithm is a Fixed Parameter Linear (FPL) algorithm for the model checking problem of q, i.e. it works in time f(q)n. This is a rather strong constraint as even the model checking problem for conjunctive queries is not FPL (assuming some hypothesis in parametrized complexity) [20]. Hence, in order to obtain constant delay enumeration algorithms, we need to make restrictions on the queries and/or on the databases. Here we consider first-order (FO) queries over classes of structures having “bounded expansion”. The notion of class of graphs with bounded expansion was introduced by Nešetřil and Ossona de Mendez in [17]. Its precise definition can be found in Section 1.2. At this point it is only useful to know

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Constant Delay Enumeration for FO Queries over Databases with Local Bounded Expansion

We consider the evaluation of first-order queries over classes of databases with local bounded expansion. This class was introduced by Nešetřil and Ossona de Mendez and generalizes many well known classes of databases, such as bounded degree, bounded tree width or bounded expansion. It is known that over classes of databases with local bounded expansion, first-order sentences can be evaluated i...

متن کامل

Compact Labelings For Efficient First-Order Model-Checking

We consider graph properties that can be checked from labels, i.e., bit sequences, of logarithmic length attached to vertices. We prove that there exists such a labeling for checking a first-order formula with free set variables in the graphs of every class that is nicely locally clique-width-decomposable. This notion generalizes that of a nicely locally tree-decomposable class. The graphs of s...

متن کامل

First order properties on nowhere dense structures

A set A of vertices of a graph G is called d-scattered in G if no two d-neighborhoods of (distinct) vertices of A intersect. In other words, A is d-scattered if no two distinct vertices of A have distance at most 2d. This notion was isolated in the context of finite model theory by Gurevich and recently it played a prominent role in the study of homomorphism preservation theorems for special cl...

متن کامل

Enumeration for FOQueries over Nowhere Dense Graphs

We consider the evaluation of first-order queries over classes of databases that are nowhere dense. The notion of nowhere dense classes was introduced by Nešetřil and Ossona de Mendez as a formalization of classes of “sparse” graphs and generalizes many well-known classes of graphs, such as classes of bounded degree, bounded treewidth, or bounded expansion. It has recently been shown by Grohe, ...

متن کامل

Efficient First-Order Model-Checking Using Short Labels

We prove that there exists an O(log(n))-labeling scheme for every first-order formula with free set variables in every class of graphs that is nicely locally cwd-decomposable, which contains in particular, the nicely locally treedecomposable classes. For every class of bounded expansion we prove that every bounded formula has an O(log(n))-labeling scheme. We also prove that, for fixed k, every ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1802.04613  شماره 

صفحات  -

تاریخ انتشار 2018